/* 文章容器 */
.article-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

/* 文章头部 */
.article-header {
    grid-column: 1 / -1;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.article-title {
    font-size: 2.5rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.article-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    padding: 0.25rem 0.75rem;
    background-color: var(--tag-bg);
    color: var(--tag-color);
    border-radius: 20px;
    font-size: 0.875rem;
    text-decoration: none;
    transition: background-color 0.3s;
}

.tag:hover {
    background-color: var(--tag-bg-hover);
}

/* 文章内容 */
.article-content {
    grid-column: 1 / 2;
}

.article-toc {
    position: sticky;
    top: 2rem;
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.article-toc h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.article-toc ul {
    list-style: none;
    padding: 0;
}

.article-toc li {
    margin-bottom: 0.5rem;
}

.article-toc a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.article-toc a:hover {
    color: var(--primary-color);
}

/* 文章段落样式 */
.article-content section {
    margin-bottom: 3rem;
}

.article-content h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--heading-color);
}

.article-content p {
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.article-content ul, .article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* 代码块样式 */
.article-content pre {
    background-color: var(--code-bg);
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.article-content code {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
}

/* 文章底部 */
.article-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.article-author {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.author-info p {
    color: var(--text-light);
    line-height: 1.6;
}

.article-share {
    text-align: center;
}

.article-share h3 {
    margin-bottom: 1rem;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    background-color: var(--button-bg);
    color: var(--button-text);
    cursor: pointer;
    transition: background-color 0.3s;
}

.share-btn:hover {
    background-color: var(--button-bg-hover);
}

/* 评论区 */
.article-comments {
    grid-column: 1 / 2;
    margin-top: 3rem;
}

.comment-form {
    margin-bottom: 2rem;
}

.comment-form textarea {
    width: 100%;
    height: 120px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    resize: vertical;
    margin-bottom: 1rem;
}

.comment-form button {
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.comment-form button:hover {
    background-color: var(--primary-color-dark);
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.comment-item {
    display: flex;
    gap: 1rem;
}

.comment-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.comment-author {
    font-weight: 600;
    color: var(--text-color);
}

.comment-date {
    color: var(--text-light);
    font-size: 0.875rem;
}

.comment-text {
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.comment-actions {
    display: flex;
    gap: 1rem;
}

.comment-actions button {
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: none;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s;
}

.comment-actions button:hover {
    background-color: var(--bg-secondary);
    color: var(--text-color);
}

/* 侧边栏 */
.article-sidebar {
    grid-column: 2 / 3;
}

.widget {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.widget h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.widget ul {
    list-style: none;
    padding: 0;
}

.widget li {
    margin-bottom: 1rem;
}

.widget a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.widget a:hover {
    color: var(--primary-color);
}

.view-count {
    color: var(--text-light);
    font-size: 0.875rem;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .article-container {
        grid-template-columns: 1fr;
    }

    .article-sidebar {
        grid-column: 1 / 2;
    }
}

@media (max-width: 768px) {
    .article-title {
        font-size: 2rem;
    }

    .article-meta {
        flex-wrap: wrap;
    }

    .share-buttons {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .article-title {
        font-size: 1.75rem;
    }

    .comment-item {
        flex-direction: column;
    }

    .comment-avatar {
        width: 40px;
        height: 40px;
    }
} 